#include "Buffer.h"

size_t Buffer::get_size() const {
    return this->buffer.size();
}

const std::string& Buffer::get() const {
    return this->buffer;
}

const char *Buffer::get_c_string() const {
    return this->get().c_str();
}

void Buffer::set_buffer(const char *string) {
    std::string temp_string(string);
    buffer.swap(temp_string);
}

void Buffer::append(const char *data) {
    this->buffer.append(data);
}

void Buffer::append(const std::string& data) {
    this->buffer.append(data);
}

void Buffer::clear() {
    this->buffer.clear();
}

void Buffer::reserve(unsigned length) {
    this->buffer.reserve(length);
}
